//
//  CYEmoticon.h
//  LingLingBang
//
//  Created by 郝俊聪 on 15/12/28.
//  Copyright © 2015年 zhaohongling. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CYEmoticon : NSObject

@property (nonatomic, copy) NSString *str;  //表情对应字符
@property (nonatomic, copy) NSString *png;  //表情图片名称
@property (nonatomic, assign) BOOL isDelete;  //是否是删除按钮
@property (nonatomic, assign) BOOL isEmpty;   //是否是空表情

///返回所有的表情对象
+ (NSArray *)allEmoticonsFromPlist;
///将带表情符号文字转化为带emoticon图片的属性文字
+ (NSAttributedString *)emoticonStringWith:(NSString *)text lineHeight:(CGFloat)lineHeight;
///带附件textView的高度
+ (CGFloat)textViewHeightWith:(NSAttributedString *)attriStr textViewWith:(CGFloat)width withFont:(UIFont *)font textColor:(UIColor *)color;
///返回设置好字体的富文本
+ (NSAttributedString *)emoticonStringWith:(NSString *)text lineHeight:(CGFloat)lineHeight font:(UIFont *)font textColor:(UIColor *)color;
//返回设置好字体的富文本+行间距
+ (NSAttributedString *)emoticonStringWith:(NSString *)text font:(UIFont *)font textColor:(UIColor *)color lineSpacing:(CGFloat)lineSpacing;

/**
 转化表情富文本+行间距+html文本
 
 @param text 需要转化的文字
 @param font 字体
 @param color 字体颜色
 @param lineSpacing 行间距
 @return 转化完的富文本
 */
+ (NSAttributedString *)emoticonHtmlStringWith:(NSString *)text font:(UIFont *)font textColor:(UIColor *)color lineSpacing:(CGFloat)lineSpacing;

@end
